<div class="p-head">
    <b class="c3">统计</b>
    <div class="r">
        <a href="/bbs/index/3/" class="ajax" title="意见反馈">意见反馈</a>
    </div>
    <div id="desc">
        年度统计报表。。。
    </div>
</div>
<div class="tabs_t tabs_n">
    <ul class="ajax">
        <?php foreach ($typelist as $m => $n) { ?>
            <li class="<?= segment(1) == $m ? 'current' : '' ?>"><a href="/statics/<?= $m ?>/"><?= $n ?></a></li>                        
        <?php } ?>
    </ul>
    <span class="r clear">
    </span>
</div>
<div class="tabs_m">
    <div id="year_list" class="year_all" style="margin-top:15px;">
        <div class="year_du_title">
            <ul>
                <li class="l1">收入</li>
                <li class="l2">一月</li>
                <li class="l3">二月</li>
                <li class="l4">三月</li>
                <li class="l5">四月</li>
                <li class="l6">五月</li>
                <li class="l7">六月</li>
                <li class="l8">七月</li>
                <li class="l9">八月</li>
                <li class="l10">九月</li>
                <li class="l11">十月</li>
                <li class="l12">十一月</li>
                <li class="l13">十二月</li>
                <li class="l14">全年</li>
            </ul>
        </div>
        <div class="year_du_list clearfix">
             <?php foreach($reportlist['income'] as $m=>$n){?>
            <ul <?php if($m == 'total'){?>class="bor"<?php }?>>
                <li class="l1"><a href="/bill/index/income/?category_id=<?=$n['category']['id']?>" title="点击查看记账记录" class="ajax"><?=$n['category']['name']?></a></li>
                <?php for($i=1;$i<=12;$i++){
                $month = sprintf("%02d", $i);
                ?>
                <li class="l2"><?=isset($n[$month]) ? $n[$month] : 0?></li>
                <?php }?>
                <li class="l2"><?=$n['all']?></li>
            </ul>
            <?php }?>
        </div>
        <div class="year_du_title" style="margin-top:25px;">
            <ul>
                <li class="l1">支出</li>
                <li class="l2">一月</li>
                <li class="l3">二月</li>
                <li class="l4">三月</li>
                <li class="l5">四月</li>
                <li class="l6">五月</li>
                <li class="l7">六月</li>
                <li class="l8">七月</li>
                <li class="l9">八月</li>
                <li class="l10">九月</li>
                <li class="l11">十月</li>
                <li class="l12">十一月</li>
                <li class="l13">十二月</li>
                <li class="l14">全年</li>
            </ul>
        </div>
        <div class="year_du_list clearfix">
            <?php foreach($reportlist['expense'] as $m=>$n){?>
            <ul <?php if($m == 'total'){?>class="bor"<?php }?>>
                <li class="l1"><a href="/bill/index/expense/?category_id=<?=$n['category']['id']?>" title="点击查看记账记录" class="ajax"><?=$n['category']['name']?></a></li>
                <?php for($i=1;$i<=12;$i++){
                $month = sprintf("%02d", $i);
                ?>
                <li class="l2"><?=isset($n[$month]) ? $n[$month] : 0?></li>
                <?php }?>
                <li class="l2"><?=$n['all']?></li>
            </ul>
            <?php }?>
        </div>
    </div>
</div>
<script type="text/javascript">
    KS.common.load('statistics.report');
</script>